unit homepage;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, SHDocVw, bsSkinCtrls, BusinessSkinForm, rxAnimate,
  rxGIFCtrl, ExtCtrls;

type
  TfrmHome = class(TForm)
    bsBusinessSkinForm1: TbsBusinessSkinForm;
    btnCancel: TbsSkinButton;
    homeBrowser: TWebBrowser;
    pnlProcess: TPanel;
    imgProcess: TRxGIFAnimator;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure homeBrowserDownloadBegin(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
    procedure homeBrowserDownloadComplete(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmHome: TfrmHome;

implementation
uses uDmodule;

{$R *.dfm}

procedure TfrmHome.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TfrmHome.FormCreate(Sender: TObject);
begin
  homeBrowser.Navigate('http://minisite.qq.com/sh/index.shtml');  
end;

procedure TfrmHome.homeBrowserDownloadBegin(Sender: TObject);
begin
  pnlProcess.Left := (HomeBrowser.Width - pnlProcess.Width) div 2;
  pnlProcess.Top  := (HomeBrowser.Height - pnlProcess.Height) div 2;
  pnlProcess.Visible := true;
  pnlProcess.BringToFront;
end;

procedure TfrmHome.btnCancelClick(Sender: TObject);
begin
  close;
end;

procedure TfrmHome.homeBrowserDownloadComplete(Sender: TObject);
begin
  pnlProcess.Visible := false;
  pnlProcess.SendToBack;
end;

end.
